-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update sandboxes to use vite and typescript #9
Update sandboxes to use vite and typescript #9
Conversation
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"skipLibCheck": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be removed, currently it is blocked by rehypejs/rehype#147
cadabb6
to
17ed513
Compare
"main": "src/main.tsx", | ||
"type": "module", | ||
"dependencies": { | ||
"react": "^18.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this also updates to React 18
@@ -48,7 +48,8 @@ | |||
"sandbox-templates/**/*.tsx" | |||
], | |||
"rules": { | |||
"@typescript-eslint/naming-convention": "off" | |||
"@typescript-eslint/naming-convention": "off", | |||
"react/react-in-jsx-scope": "off" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the vite react transform does not require react in scope
// eslint-disable-next-line n/file-extension-in-import | ||
import ReactDOM from 'react-dom/client' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this lint rule will break the code by adding a .js
extension.
react-dom/client
is in the export map, react-dom/client.js
is not a thing.
the native dependencies in parcel no longer work in browser sandboxes like stackblitz create react app has been (for all intents and purposes) deprecated by the react team vite offers a replacement for both also run sandboxes through typescript to catch potential issues with plugin compatibility and options.
17ed513
to
de04f8c
Compare
Initial checklist
Description of changes
the native dependencies in parcel no longer work in browser sandboxes like stackblitz
create react app has been (for all intents and purposes) deprecated by the react team
vite offers a replacement for both
also run sandboxes through typescript to catch potential issues with plugin compatibility and options.
temporary stackblitz links to test with:
https://stackblitz.com/github/ChristianMurphy/.github-remark/tree/migrate-sandboxes-to-vite/sandbox-templates/remark-with-vite
https://stackblitz.com/github/ChristianMurphy/.github-remark/tree/migrate-sandboxes-to-vite/sandbox-templates/remark-rehype-with-vite
https://stackblitz.com/github/ChristianMurphy/.github-remark/tree/migrate-sandboxes-to-vite/sandbox-templates/react-markdown-with-vite
CodeSandbox currently has issues with any repo with a
.
in it's name getting blocked by cloudflare or triggering a not authorized error.